\(\int \sqrt {a+a \sin (c+d x)} \, dx\) [36]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 26 \[ \int \sqrt {a+a \sin (c+d x)} \, dx=-\frac {2 a \cos (c+d x)}{d \sqrt {a+a \sin (c+d x)}} \]

[Out]

-2*a*cos(d*x+c)/d/(a+a*sin(d*x+c))^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {2725} \[ \int \sqrt {a+a \sin (c+d x)} \, dx=-\frac {2 a \cos (c+d x)}{d \sqrt {a \sin (c+d x)+a}} \]

[In]

Int[Sqrt[a + a*Sin[c + d*x]],x]

[Out]

(-2*a*Cos[c + d*x])/(d*Sqrt[a + a*Sin[c + d*x]])

Rule 2725

Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*b*(Cos[c + d*x]/(d*Sqrt[a + b*Sin[c + d*x
]])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {2 a \cos (c+d x)}{d \sqrt {a+a \sin (c+d x)}} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(65\) vs. \(2(26)=52\).

Time = 0.03 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.50 \[ \int \sqrt {a+a \sin (c+d x)} \, dx=\frac {2 \left (-\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {a (1+\sin (c+d x))}}{d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )} \]

[In]

Integrate[Sqrt[a + a*Sin[c + d*x]],x]

[Out]

(2*(-Cos[(c + d*x)/2] + Sin[(c + d*x)/2])*Sqrt[a*(1 + Sin[c + d*x])])/(d*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])
)

Maple [A] (verified)

Time = 0.36 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.65

method result size
default \(\frac {2 \left (1+\sin \left (d x +c \right )\right ) \left (\sin \left (d x +c \right )-1\right ) a}{\cos \left (d x +c \right ) \sqrt {a +a \sin \left (d x +c \right )}\, d}\) \(43\)
risch \(-\frac {i \sqrt {2}\, \sqrt {-a \left (-2-2 \sin \left (d x +c \right )\right )}\, \left (-i+{\mathrm e}^{i \left (d x +c \right )}\right ) \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{\left ({\mathrm e}^{2 i \left (d x +c \right )}+2 i {\mathrm e}^{i \left (d x +c \right )}-1\right ) d}\) \(74\)

[In]

int((a+a*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

2*(1+sin(d*x+c))*(sin(d*x+c)-1)*a/cos(d*x+c)/(a+a*sin(d*x+c))^(1/2)/d

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (24) = 48\).

Time = 0.27 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.92 \[ \int \sqrt {a+a \sin (c+d x)} \, dx=-\frac {2 \, \sqrt {a \sin \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) - \sin \left (d x + c\right ) + 1\right )}}{d \cos \left (d x + c\right ) + d \sin \left (d x + c\right ) + d} \]

[In]

integrate((a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

-2*sqrt(a*sin(d*x + c) + a)*(cos(d*x + c) - sin(d*x + c) + 1)/(d*cos(d*x + c) + d*sin(d*x + c) + d)

Sympy [F]

\[ \int \sqrt {a+a \sin (c+d x)} \, dx=\int \sqrt {a \sin {\left (c + d x \right )} + a}\, dx \]

[In]

integrate((a+a*sin(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*sin(c + d*x) + a), x)

Maxima [F]

\[ \int \sqrt {a+a \sin (c+d x)} \, dx=\int { \sqrt {a \sin \left (d x + c\right ) + a} \,d x } \]

[In]

integrate((a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

integrate(sqrt(a*sin(d*x + c) + a), x)

Giac [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.38 \[ \int \sqrt {a+a \sin (c+d x)} \, dx=\frac {2 \, \sqrt {2} \sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{d} \]

[In]

integrate((a+a*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

2*sqrt(2)*sqrt(a)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))*sin(-1/4*pi + 1/2*d*x + 1/2*c)/d

Mupad [B] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.27 \[ \int \sqrt {a+a \sin (c+d x)} \, dx=-\frac {2\,\cos \left (c+d\,x\right )\,\sqrt {a\,\left (\sin \left (c+d\,x\right )+1\right )}}{d\,\left (\sin \left (c+d\,x\right )+1\right )} \]

[In]

int((a + a*sin(c + d*x))^(1/2),x)

[Out]

-(2*cos(c + d*x)*(a*(sin(c + d*x) + 1))^(1/2))/(d*(sin(c + d*x) + 1))